using System;
using System.Data;
using System.Runtime.Serialization;

namespace Venta.dbo.EN
{

    [Serializable]
    [System.Xml.Serialization.XmlType(Namespace="http://www.xpectro.biz/Venta/dbo/EN")]
    public class venta : XP.EN.EntidadGen<venta>
    {

        public const string TABLA = "dbo.venta";

        #region Constructores

        public venta()
            : base()
        {
        }
        protected venta(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }

        #endregion

        #region Propiedades

        public long? idventa
        {
            get { return this.GetValor<long>("idventa"); }
            set { this.SetValor("idventa", value); }
        }
        public long? idcaja_empleado
        {
            get { return this.GetValor<long>("idcaja_empleado"); }
            set { this.SetValor("idcaja_empleado", value); }
        }
        public TimeSpan? hora
        {
            get { return this.GetValor<TimeSpan>("hora"); }
            set { this.SetValor("hora", value); }
        }
        public DateTime? fecha
        {
            get { return this.GetValor<DateTime>("fecha"); }
            set { this.SetValor("fecha", value); }
        }
        public double? total
        {
            get { return this.GetValor<double>("total"); }
            set { this.SetValor("total", value); }
        }
        public double? pago
        {
            get { return this.GetValor<double>("pago"); }
            set { this.SetValor("pago", value); }
        }
        public double? cambio
        {
            get { return this.GetValor<double>("cambio"); }
            set { this.SetValor("cambio", value); }
        }

        #endregion

        #region Métodos

        protected override void CrearEsquema()
        {
            this.datos.TableName = TABLA;
            this.datos.Rows.Add( new object[]{"idventa", null, Convert.ToInt32(DbType.Int64).ToString(), null, null, null, null, 1, 1});
            this.datos.Rows.Add(new object[]{"idcaja_empleado", null, Convert.ToInt32(DbType.Int64).ToString(), null, null, null, null, 0, 0});
            this.datos.Rows.Add(new object[]{"hora", null, Convert.ToInt32(DbType.Time).ToString(), null, null, null, null, 0, 0});
            this.datos.Rows.Add(new object[]{"fecha", null, Convert.ToInt32(DbType.Date).ToString(), null, null, null, null, 0, 0});
            this.datos.Rows.Add(new object[]{"total", null, Convert.ToInt32(DbType.Double).ToString(), null, null, null, null, 0, 0});
            this.datos.Rows.Add(new object[]{"pago", null, Convert.ToInt32(DbType.Double).ToString(), null, null, null, null, 0, 0});
            this.datos.Rows.Add(new object[]{"cambio", null, Convert.ToInt32(DbType.Double).ToString(), null, null, null, null, 0, 0});
        }

        #endregion

    }

}
